<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="cache-control" content="max-age=86400"/>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GBDK 2020 Docs: gbdk-lib/include/stdlib.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GBDK 2020 Docs
   &#160;<span id="projectnumber">4.4.0</span>
   </div>
   <div id="projectbrief">API Documentation for GBDK 2020</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('stdlib_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">stdlib.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="stdlib_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#ifndef STDLIB_INCLUDE</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#define STDLIB_INCLUDE</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="types_8h.html">types.h</a>&gt;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a259b56e52cd0350410d31610758c7b24">   13</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="stdlib_8h.html#a259b56e52cd0350410d31610758c7b24">exit</a>(<span class="keywordtype">int</span> status) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#if 0</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keywordtype">int</span> getkey(<span class="keywordtype">void</span>) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="stdlib_8h.html#af15d7205d8d10c4820f997ce5c526279">   26</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="stdlib_8h.html#af15d7205d8d10c4820f997ce5c526279">abs</a>(<span class="keywordtype">int</span> i);</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a8b7210ba18f750970a2db3c73a841a22">   33</a></span>&#160;<span class="keywordtype">long</span> <a class="code" href="stdlib_8h.html#a8b7210ba18f750970a2db3c73a841a22">labs</a>(<span class="keywordtype">long</span> num) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a30670a60464f77af17dfb353353d6df8">   51</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="stdlib_8h.html#a30670a60464f77af17dfb353353d6df8">atoi</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *s);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a825c37450147a643edbcb1a435518307">   60</a></span>&#160;<span class="keywordtype">long</span> <a class="code" href="stdlib_8h.html#a825c37450147a643edbcb1a435518307">atol</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *s);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="stdlib_8h.html#aac2ea595a9ea8f5ebd883a0bc05eba5c">   73</a></span>&#160;<span class="keywordtype">char</span> *<a class="code" href="stdlib_8h.html#aac2ea595a9ea8f5ebd883a0bc05eba5c">itoa</a>(<span class="keywordtype">int</span> n, <span class="keywordtype">char</span> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> radix) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a38c070016cb06132360cfa5bacc2ed19">   86</a></span>&#160;<span class="keywordtype">char</span> *<a class="code" href="stdlib_8h.html#a38c070016cb06132360cfa5bacc2ed19">uitoa</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n, <span class="keywordtype">char</span> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> radix) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a6374e62474a5a76c7ace9a59fb1cc829">   99</a></span>&#160;<span class="keywordtype">char</span> *<a class="code" href="stdlib_8h.html#a6374e62474a5a76c7ace9a59fb1cc829">ltoa</a>(<span class="keywordtype">long</span> n, <span class="keywordtype">char</span> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> radix) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="stdlib_8h.html#ac22b79fe0c1279eabc3daf57328008d2">  112</a></span>&#160;<span class="keywordtype">char</span> *<a class="code" href="stdlib_8h.html#ac22b79fe0c1279eabc3daf57328008d2">ultoa</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> n, <span class="keywordtype">char</span> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> radix) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a62b7798461bd461da64c5f9d35feddf7">  117</a></span>&#160;<span class="keywordtype">void</span> *<a class="code" href="stdlib_8h.html#a62b7798461bd461da64c5f9d35feddf7">calloc</a> (<span class="keywordtype">size_t</span> nmemb, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a7ac38fce3243a7dcf448301ee9ffd392">  118</a></span>&#160;<span class="keywordtype">void</span> *<a class="code" href="stdlib_8h.html#a7ac38fce3243a7dcf448301ee9ffd392">malloc</a> (<span class="keywordtype">size_t</span> size);</div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a1a6b5e8d2f1c37e5b43e4345586075be">  119</a></span>&#160;<span class="keywordtype">void</span> *<a class="code" href="stdlib_8h.html#a1a6b5e8d2f1c37e5b43e4345586075be">realloc</a> (<span class="keywordtype">void</span> *ptr, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="preprocessor">#if __STDC_VERSION__ &gt;= 201112L</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> *aligned_alloc(<span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> size)</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;{</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  (void)alignment;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="stdlib_8h.html#a7ac38fce3243a7dcf448301ee9ffd392">malloc</a>(size);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;}</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="stdlib_8h.html#afbedc913aa4651b3c3b4b3aecd9b4711">  127</a></span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="stdlib_8h.html#afbedc913aa4651b3c3b4b3aecd9b4711">free</a> (<span class="keywordtype">void</span> * ptr);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="comment">/* Searching and sorting utilities (ISO C11 7.22.5) */</span></div>
<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="stdlib_8h.html#a7e208aa7d4ee2f78ae85fff6c36d3a07">  140</a></span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> *<a class="code" href="stdlib_8h.html#a7e208aa7d4ee2f78ae85fff6c36d3a07">bsearch</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *key, <span class="keyword">const</span> <span class="keywordtype">void</span> *base, <span class="keywordtype">size_t</span> nmemb, <span class="keywordtype">size_t</span> size, <span class="keywordtype">int</span> (*compar)(<span class="keyword">const</span> <span class="keywordtype">void</span> *, <span class="keyword">const</span> <span class="keywordtype">void</span> *) REENTRANT);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="stdlib_8h.html#aaede534f3eed2c667229d50df10fca0e">  149</a></span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="stdlib_8h.html#aaede534f3eed2c667229d50df10fca0e">qsort</a>(<span class="keywordtype">void</span> *base, <span class="keywordtype">size_t</span> nmemb, <span class="keywordtype">size_t</span> size, <span class="keywordtype">int</span> (*compar)(<span class="keyword">const</span> <span class="keywordtype">void</span> *, <span class="keyword">const</span> <span class="keywordtype">void</span> *) REENTRANT);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="aasm_2types_8h_html_a0971918860055db2e50dacea4da8f3bc"><div class="ttname"><a href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></div><div class="ttdeci">#define OLDCALL</div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
<div class="ttc" id="astdlib_8h_html_a1a6b5e8d2f1c37e5b43e4345586075be"><div class="ttname"><a href="stdlib_8h.html#a1a6b5e8d2f1c37e5b43e4345586075be">realloc</a></div><div class="ttdeci">void * realloc(void *ptr, size_t size)</div></div>
<div class="ttc" id="astdlib_8h_html_a259b56e52cd0350410d31610758c7b24"><div class="ttname"><a href="stdlib_8h.html#a259b56e52cd0350410d31610758c7b24">exit</a></div><div class="ttdeci">void exit(int status) OLDCALL</div></div>
<div class="ttc" id="astdlib_8h_html_a30670a60464f77af17dfb353353d6df8"><div class="ttname"><a href="stdlib_8h.html#a30670a60464f77af17dfb353353d6df8">atoi</a></div><div class="ttdeci">int atoi(const char *s)</div></div>
<div class="ttc" id="astdlib_8h_html_a38c070016cb06132360cfa5bacc2ed19"><div class="ttname"><a href="stdlib_8h.html#a38c070016cb06132360cfa5bacc2ed19">uitoa</a></div><div class="ttdeci">char * uitoa(unsigned int n, char *s, unsigned char radix) OLDCALL</div></div>
<div class="ttc" id="astdlib_8h_html_a62b7798461bd461da64c5f9d35feddf7"><div class="ttname"><a href="stdlib_8h.html#a62b7798461bd461da64c5f9d35feddf7">calloc</a></div><div class="ttdeci">void * calloc(size_t nmemb, size_t size)</div></div>
<div class="ttc" id="astdlib_8h_html_a6374e62474a5a76c7ace9a59fb1cc829"><div class="ttname"><a href="stdlib_8h.html#a6374e62474a5a76c7ace9a59fb1cc829">ltoa</a></div><div class="ttdeci">char * ltoa(long n, char *s, unsigned char radix) OLDCALL</div></div>
<div class="ttc" id="astdlib_8h_html_a7ac38fce3243a7dcf448301ee9ffd392"><div class="ttname"><a href="stdlib_8h.html#a7ac38fce3243a7dcf448301ee9ffd392">malloc</a></div><div class="ttdeci">void * malloc(size_t size)</div></div>
<div class="ttc" id="astdlib_8h_html_a7e208aa7d4ee2f78ae85fff6c36d3a07"><div class="ttname"><a href="stdlib_8h.html#a7e208aa7d4ee2f78ae85fff6c36d3a07">bsearch</a></div><div class="ttdeci">void * bsearch(const void *key, const void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *) REENTRANT)</div></div>
<div class="ttc" id="astdlib_8h_html_a825c37450147a643edbcb1a435518307"><div class="ttname"><a href="stdlib_8h.html#a825c37450147a643edbcb1a435518307">atol</a></div><div class="ttdeci">long atol(const char *s)</div></div>
<div class="ttc" id="astdlib_8h_html_a8b7210ba18f750970a2db3c73a841a22"><div class="ttname"><a href="stdlib_8h.html#a8b7210ba18f750970a2db3c73a841a22">labs</a></div><div class="ttdeci">long labs(long num) OLDCALL</div></div>
<div class="ttc" id="astdlib_8h_html_aac2ea595a9ea8f5ebd883a0bc05eba5c"><div class="ttname"><a href="stdlib_8h.html#aac2ea595a9ea8f5ebd883a0bc05eba5c">itoa</a></div><div class="ttdeci">char * itoa(int n, char *s, unsigned char radix) OLDCALL</div></div>
<div class="ttc" id="astdlib_8h_html_aaede534f3eed2c667229d50df10fca0e"><div class="ttname"><a href="stdlib_8h.html#aaede534f3eed2c667229d50df10fca0e">qsort</a></div><div class="ttdeci">void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *) REENTRANT)</div></div>
<div class="ttc" id="astdlib_8h_html_ac22b79fe0c1279eabc3daf57328008d2"><div class="ttname"><a href="stdlib_8h.html#ac22b79fe0c1279eabc3daf57328008d2">ultoa</a></div><div class="ttdeci">char * ultoa(unsigned long n, char *s, unsigned char radix) OLDCALL</div></div>
<div class="ttc" id="astdlib_8h_html_af15d7205d8d10c4820f997ce5c526279"><div class="ttname"><a href="stdlib_8h.html#af15d7205d8d10c4820f997ce5c526279">abs</a></div><div class="ttdeci">int abs(int i)</div></div>
<div class="ttc" id="astdlib_8h_html_afbedc913aa4651b3c3b4b3aecd9b4711"><div class="ttname"><a href="stdlib_8h.html#afbedc913aa4651b3c3b4b3aecd9b4711">free</a></div><div class="ttdeci">void free(void *ptr)</div></div>
<div class="ttc" id="atypes_8h_html"><div class="ttname"><a href="types_8h.html">types.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
</div>
</body>
</html>
